package com.example.pharmacy.service;

import com.example.pharmacy.mapper.CategoryInfoMapper;
import com.example.pharmacy.mapper.DrugInfoMapper;
import com.example.pharmacy.model.Category;
import com.example.pharmacy.model.CategoryResult;
import com.example.pharmacy.model.DrugInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: asus
 * Date: 2024-12-21
 * Time: 19:46
 */
@Service
public class CategoryService {
    @Autowired
    private CategoryInfoMapper categoryInfoMapper;
    @Autowired
    private DrugInfoMapper drugInfoMapper;
    public List<Category> selectAllCategory() {
        return categoryInfoMapper.selectAllCategory();
    }
    public Integer insertCategory(Category category) {
        return categoryInfoMapper.insertCategory(category);
    }
    public Integer updateCategory(Category category) {
        return categoryInfoMapper.updateCategory(category);
    }
}
